import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    meta: { title: '首页', icon: 'fa fa-home' },
    component: HomeView
  },
  {
    path: '/detail',
    name: 'detail',
    component: () => import('@/views/BlogDetailView'),
    meta: { title: '文章详情' },
    hidden: true
  },
  {
    path: '/type',
    name: 'type',
    meta: { title: '分类', icon: 'fa fa-clone' },
    component: () => import('../views/TypeView.vue')
  },
  {
    path: '/record',
    name: 'record',
    meta: { title: '流年记', icon: 'fa fa-coffee' },
    component: () => import('../views/RecordView.vue')
  },
  {
    path: '/music',
    name: 'music',
    meta: { title: '音乐盒', icon: 'fa fa-music' },
    component: () => import('../views/MusicView.vue')
  },
  {
    path: '/message',
    name: 'message',
    meta: { title: '留言板', icon: 'fa fa-book' },
    component: () => import('../views/MessageView.vue')
  },
  {
    path: '/friend',
    name: 'friend',
    meta: { title: '友人帐', icon: 'fa fa-pencil' },
    component: () => import('../views/FriendView.vue')
  },
  {
    path: '/picture',
    name: 'picture',
    meta: { title: '照片墙', icon: 'fa fa-photo' },
    component: () => import('../views/PictureView.vue')
  },
  {
    path: '/resources',
    name: 'resources',
    meta: { title: '资源库', icon: 'fa fa-graduation-cap' },
    component: () => import('../views/ResourcesView.vue')
  },
  {
    path: '/about',
    name: 'about',
    meta: { title: '关于我', icon: 'fa fa-info' },
    component: () => import('../views/AboutView.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
